package com.woniuxy.dudugua.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class Coupon {
    /**
    * 优惠券id
    */
    private Integer id;

    /**
    * 优惠券名字
    */
    private String title;

    /**
    * 优惠券解释
    */
    private String comment;

    /**
    * 优惠券规则id
    */
    private Integer couponRuleId;

    /**
    * 表示店铺id或全平台使用或限制某商品使用  1表示全平台 2 表示店铺 3表示某商品   （当该字段值为3时 不考虑限制商品类型字段
    */
    private Integer useScope;

    /**
    * 需结合上个字段使用  当上个字段的值为1时可忽略  为2时该字段填写店铺id  为3时填写商品id
    */
    private Integer scopeId;

    /**
    * 表示限制商品类型 0为全品类 否则给三级类型字段
    */
    private Integer useType;

    /**
    * 有效日期起始日期
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
    * 有效日期结束日期
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
    * 发送总张数
    */
    private Integer sendSum;

    /**
    * 现发送张数
    */
    private Integer sendNum;

    /**
    * 限制每个用户领取张数
    */
    private Integer userGetNum;

    private CouponRule couponRule;

    public CouponRule getCouponRule() {
        return couponRule;
    }

    public void setCouponRule(CouponRule couponRule) {
        this.couponRule = couponRule;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Integer getCouponRuleId() {
        return couponRuleId;
    }

    public void setCouponRuleId(Integer couponRuleId) {
        this.couponRuleId = couponRuleId;
    }

    public Integer getUseScope() {
        return useScope;
    }

    public void setUseScope(Integer useScope) {
        this.useScope = useScope;
    }

    public Integer getScopeId() {
        return scopeId;
    }

    public void setScopeId(Integer scopeId) {
        this.scopeId = scopeId;
    }

    public Integer getUseType() {
        return useType;
    }

    public void setUseType(Integer useType) {
        this.useType = useType;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getSendSum() {
        return sendSum;
    }

    public void setSendSum(Integer sendSum) {
        this.sendSum = sendSum;
    }

    public Integer getSendNum() {
        return sendNum;
    }

    public void setSendNum(Integer sendNum) {
        this.sendNum = sendNum;
    }

    public Integer getUserGetNum() {
        return userGetNum;
    }

    public void setUserGetNum(Integer userGetNum) {
        this.userGetNum = userGetNum;
    }

    @Override
    public String toString() {
        return "Coupon{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", comment='" + comment + '\'' +
                ", couponRuleId=" + couponRuleId +
                ", useScope=" + useScope +
                ", scopeId=" + scopeId +
                ", useType=" + useType +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", sendSum=" + sendSum +
                ", sendNum=" + sendNum +
                ", userGetNum=" + userGetNum +
                ", couponRule=" + couponRule +
                '}';
    }
}